package cn.redsoft.wechatapi.msg.resp.passivity;

import java.util.List;

import com.thoughtworks.xstream.annotations.XStreamAlias;

@XStreamAlias("xml")
public class NewsResponseMsg extends PassivityResponseMsg {

	@XStreamAlias("ArticleCount")
	protected int articleCount;

	@XStreamAlias("Articles")
	protected List<Article> articles;

	public NewsResponseMsg() {
		super();
		this.msgType = PassivityResponseMsgType.NEWS;
	}

	public int getArticleCount() {
		return articleCount;
	}

	public void setArticleCount(int articleCount) {
		this.articleCount = articleCount;
	}

	public List<Article> getArticles() {
		return articles;
	}

	public void setArticles(List<Article> articles) {
		this.articles = articles;
	}

	@XStreamAlias("item")
	public static class Article {
		@XStreamAlias("Title")
		private String title;
		
		@XStreamAlias("Description")
		private String description;
		
		@XStreamAlias("PicUrl")
		private String picUrl;
		
		@XStreamAlias("Url")
		private String url;

		public Article() {
			super();
		}

		public Article(String title, String description, String picUrl,
				String url) {
			super();
			this.title = title;
			this.description = description;
			this.picUrl = picUrl;
			this.url = url;
		}

		public String getTitle() {
			return title;
		}

		public void setTitle(String title) {
			this.title = title;
		}

		public String getDescription() {
			return description;
		}

		public void setDescription(String description) {
			this.description = description;
		}

		public String getPicUrl() {
			return picUrl;
		}

		public void setPicUrl(String picUrl) {
			this.picUrl = picUrl;
		}

		public String getUrl() {
			return url;
		}

		public void setUrl(String url) {
			this.url = url;
		}
	}

}
